<!--
 * @Descripttion: 
 * @Author: voanit
 * @Date: 2022-08-27 14:45:13
 * @LastEditors: voanit
 * @LastEditTime: 2022-08-27 14:53:20
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    /* 目的：实现数组去重 */
    var arr = [1, 2, 3, 4, 2, 3, 1, 5]
    // var set = [...new Set(arr)]
    var set = Array.from(new Set(arr))
    console.log(set, 888);
    /* es6中的 Set 和 Map 的区别 */
  </script>
</body>

</html>